L = [x * 2 for x in range(5)]
print(L)  # [0, 2, 4, 6, 8]
G = (x * 2 for x in range(5))
print(G)  # <generator object <genexpr> at 0x0000020EB348C938>
for i in G:
    print(i)
# 0
# 2
# 4
# 6
# 8